# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=opensmtpd-filter-rspamd
_pkgname=filter-rspamd
pkgver=0.1.7
pkgrel=6
pkgdesc="OpenSMTPD filter integration for Rspamd"
url="https://github.com/poolpOrg/filter-rspamd"
license="ISC"
arch="all"
options="!check" # No test suite
depends="opensmtpd"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/poolpOrg/filter-rspamd/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	go build

	# Compress man page
	gzip -n -9 $_pkgname.8
}

package() {
	install -Dm755 "$_pkgname" -t "$pkgdir"/usr/lib/opensmtpd/
	install -Dm655 "$_pkgname.8.gz" -t "$pkgdir"/usr/share/man/man8/
}

sha512sums="7f098450a19b59c97d050c25ff4d2295c7d42b92e8d312867b9734e4f38f99833290e67402dd1f9bccd31ebd6245c6eb1461fbd8434d41dfb791498315b4ebf5  opensmtpd-filter-rspamd-0.1.7.tar.gz"
